package jmail;

import java.awt.Container;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;
import javax.swing.*;


public class MailAuthenticator extends Authenticator {

  private String username;
  private String password;
  
  public MailAuthenticator() {
  }
    
  public MailAuthenticator(String username,String password) {
    this.username = username;
    this.password = password;
  }

    @Override
  public PasswordAuthentication getPasswordAuthentication() { 
    return new PasswordAuthentication(this.username, this.password);
  }
}